import {
  INCREMENT,
  DECREMENT,
  RESET
} from '../../../constants/ActionTypes';

const initialState = {
  count: 0,
  introduction:""
};

const counter = (state = initialState, action) => {
  console.log(8888,action)
  switch (action.type) {
    case INCREMENT:
      return {
        ...state,
        count: state.count + 1 
      };
    case DECREMENT:
      return {
        ...state,
        count: state.count - 1
      };
    case RESET:
      return {
        ...state,
        count: 0,
        introduction:"66666666666666666666"
      };
    default:
      return state;
  }
};

export default counter;
